template <class NodeKey,class T>
class avl_tree 
	{
	private:
		struct avl_node_t
		{
			NodeKey key;
			T data;
			struct avl_node *parent, *Right_s, *Left_s;
			int DeltaHeight;
		}
		roll(struct avl_node *p);
	public:		
		avl_tree();
		~avl_tree();
		insert(const KEY key,T data);
		remove (const KEY key);
		T& retrive (const KEY key);
}

template <class T>
class Queue
{
	struct Queue_node_t
		{
			T data;
			struct Queue_node *prev,*next;
		}
	public:

		

}

class AVLT_Shop:private AVLT_FIFO<struct Item>
{
protected :
	struct KyeForPrice {
		int price;
		char * name;
	}
	bool opertor>(const KyeForPrice& key_1,const KyeForPrice& key_2);

	int base_price;
	AVLT_KEY< char */*key*/,avl_node/*data*/> ItemName;
	AVLT_EDGE< KyeForPrice /*key*/,avl_node/*data*/> ItemPrice;

	
public:
	struct Item {
		int price;
		char * name;
	}

AVLT_Shop 
StatusType  AddFish(void* const DS, const char* const name, const int price);


//Description:   Sells one fish.
//Input:         DS    - a pointer to the data structure.
//               name  - name of the fish's brand.
//Return Value:  ALLOCATION_ERROR - in case of an allocation error.
//               INVALID_INPUT - if name is illegal.
//               FAILURE - if there's no brand called 'name' or any other error.
//               SUCCESS - otherwise.
StatusType  SellFish(void* const DS, const char* const name);


//Description:   Changes the price of the fishes of brand 'name'.
//Input:         DS    - a pointer to the data structure.
//               name  - name of the fish's brand.
//               price - the new fish brand's price.
//Return Value:  ALLOCATION_ERROR - in case of an allocation error.
//               INVALID_INPUT - if name is illegal or price<=0.
//               FAILURE - if there's no brand called 'name' or any other error.
//               SUCCESS - otherwise.
StatusType  ChangePrice(void* const DS, const char* const name, int const price);


//Description:   Gets the price of the fishes of brand 'name'.
//Input:         DS    - a pointer to the data structure.
//               name  - name of the fish's brand.
//Output:        price - the price of the brand 'name'.
//Return Value:  INVALID_INPUT - if name is illeagal.
//               FAILURE - if there's no brand called 'name' or any other error.
//               SUCCESS - otherwise.
StatusType  GetPrice(void* const DS, const char* const name, int* const price);


//Description:   Adds delta to the prices of all of the fish.
//Input:         DS    - a pointer to the data structure.
//               delta - every price x will become x+delta.
//Return Value:  INVALID_INPUT - if delta is negavitve and one of the prices
//                               in the store becomes 0 or negative.
//               FAILURE - in case of any other error.
//               SUCCESS - otherwise.
StatusType  UpdateAllPrices(void* const DS, const int delta);


//Description:   Gets the number of fishes of brand 'name'.
//Input:         DS    - a pointer to the data structure.
//               name  - name of the fish's brand.
//Output:        num   - the number of fishes of brand 'name'.
//Return Value:  INVALID_INPUT - if name is illegal.
//               FAILURE - if there's no brand called 'name' or any other error.
//               SUCCESS - otherwise.
StatusType  NumFishesOfType(void* const DS, const char* const name, int* const num);


//Description:   Gets the number and price of the most expensive fish.
//               If there are more than one brand with the highest price, the
//               one with the largest lexicographical name will be chosen.
//Input:         DS    - a pointer to the data structure.
//Output:        num   - the number of the most expensive fish.
//               price - the price of the most expensive fish.
//Return Value:  FAILURE - in case of an error.
//               SUCCESS - otherwise.
StatusType  NumOfMostExpensive(void* const DS, int* const num, int* const price);


//Description:   Returns the minimal price of a fish.
//Input:         DS    - a pointer to the data structure.
//Output:        p     - the minimal price in the store.
//Return Value:  FAILURE - if the store is empty.
//               SUCCESS - otherwise.
StatusType  MinimalPrice(void* const DS, int* const p);


//Description:   Decreases the price of the k most oldest brands of fish, as
//               described in Wet1Winter09.doc
//Input:         DS    - a pointer to the data structure.
//               k     - number of brands 
//               delta - the change in the prices of the k brands.
//Return Value:  ALLOCATION_ERROR - in case of an allocation error.
//               INVALID_INPUT - if delta < 0 or if one of the fish's price
//                               becomes 0 or negative. in that case, 
//                               the function will not change any of the prices.
//               FAILURE - in case of any other error.
//               SUCCESS - otherwise.
StatusType  Sale(void* const DS, const int k, const int delta);


//Description:   Deletes the data structure.
//Input:         DS    - a double pointer to the data structure.
//Return Value:  none. (however, the pointer to DS should become NULL)
void        Quit(void** const DS);
}

